//- Copyright (c) 2016 Lucky Byte, Inc.
input(type="hidden" name="serial" value="#{record.serial || ''}")
input(type="hidden" name="uuid" value="")

h4.ui.dividing.header
  i.caret.down.icon.link.grey.accordion
  | 基本信息

.fields
  .field.five.wide.required
    label 任务名称:
    .ui.input
      input(type="text" name="name" placeholder="必填"
        value="#{record.name || ''}")
  .field.three.wide.required
    label CRON 表达式:
      a.linkto(href="/sched/doc/cron") 说明
    .ui.input
      input(type="text" name="cron" placeholder="必填"
        value="#{record.cron || '30 1 1 * * ?'}")
  .field.two.wide.required
    label 脚本引擎:
    .ui.dropdown.labeled.selection.input
      input(type="hidden" name="engine" value="#{record.engine}")
      i.icon.dropdown
      .default.text 
      .menu
        .item(data-value="1") 1. LUA
        .item(data-value="2") 2. BASH
        .item(data-value="3") 3. PYTHON
        .item(data-value="4") 4. RUBY
        .item(data-value="5") 5. PERL
  .field.six.wide.required
    label 脚本文件:
    .ui.input
      input(type="text" name="script" placeholder="必填"
        value="#{record.script || ''}")
.fields
  .field.sixteen.wide
    label 脚本参数:
      a.linkto(href="/sched/doc/params") 说明
    textarea(name="params" type="text" rows="3" placeholder="脚本参数"
      style="font-family:monospace;")= record.params || ''

h4.ui.dividing.header
  i.caret.down.icon.link.grey.accordion
  | 选 项

.fields
  .field.inline
    .ui.checkbox.toggle
      if record.status == 1
        input(type="checkbox" name="status" checked="checked")
      else
        input(type="checkbox" name="status")
      label 调度此任务

h4.ui.dividing.header
  i.caret.down.icon.link.grey.accordion
  | 备注信息

textarea(name="notes" type="text" rows="3"
  placeholder="在此输入备忘信息")= record.notes || ''
